package kyssion.leetcode.num201_250;

import kyssion.leetcode.util.TreeNode;

public class code226_翻转二叉树 {
    public TreeNode invertTree(TreeNode root) {
        if(root==null){
            return null;
        }
        invertTree(root.left);
        invertTree(root.right);
        TreeNode item = root.left;
        root.left = root.right;
        root.right = item;
        return root;
    }
}
